home *** CD-ROM | disk | FTP | other *** search
-
- N K F l a r e . I N C
- ------------------------------------------
-
- Lens Flare "plug-in" for POV-RAY 3.0
-
- Copyright (C) 1997 Nathan Kopp
-
- Version 4.0 August, 1997
-
- ------------------------------------------
-
- *************************************************************************
- *** CONTENTS ***
- *************************************************************************
-
- - Introduction and General Use
- - New features - IMPORTANT UPGRADE INFORMATION
- - Pre-Defined Flares
- - Hiding your Flare
- - Hints, Tips, and Troubleshooting
- - Legal Stuff
- - Appendix A - Advanced Flare Attributes
- - Appendix B - Primary flare parts breakdown
-
-
- *************************************************************************
- *** INTRODUCTION AND GENERAL USE ***
- *************************************************************************
-
- NKFlare is a very flexible lens flare include file for POV-Ray 3.0.
-
- -------------------------------------------------------------------------
- Installation Instructions for NKFlare
- -------------------------------------------------------------------------
- Unzip NKFlare.zip to any directory you want to. ;)
-
- Here are the files that you should find:
- NKFlare.txt - this text file
- NKFlare.inc - the lens flare inc file
- *.flr - preset flare definition files
- test*.pov - test files
-
- Next, you need to do one of the following:
- 1) Copy NKFlare.inc and all of the FLR files to your povray "include"
- directory (folder).
- 2) Add the directory that contains NKFlare.inc and all of the FLR
- files to your library path. (See section 6.2.2.6 in the POV-Ray
- documentation for more information on the library path.)
- -------------------------------------------------------------------------
-
- Adding lens flare to your POV scene is now a simple as adding the
- following few lines to your scene description file:
-
- #declare cam_loc = <x,y,z> // use the x, y, and z of your camera
- #declare light_loc = <x,y,z> // use the x, y, and z of the light
- // you wish to flare
- #declare lookat = <x,y,z> // the look_at vector of your camera
- #declare sky_vect = <x,y,z> // the sky vector of your camera
- #include "35mm.flr" // or whatever pre-defined flare you like
- #include "nkflare.inc" // create the lens flare
-
- NKFlare will track the specified light_source even in animations as
- long as the above variables are equal to the positions of their
- respective objects in the scene. Keep this in mind when you start
- rotating and translating lights and the camera. You may need to use
- POV functions such as VROTATE to transform the camera's coordinates
- before you include NKFlare. This is also true for the location of
- things like the light, the planet, etc.
-
- Example:
- camera {
- location < 0, 0, 0>
- direction < 0, 0, 1>
- up < 0, 1, 0>
- right < 1, 0, 0>
- rotate <30, 60, 30>
- translate < 5, 3, 4>
- look_at < 0, 0, 0>
- }
- #declare cam_loc = <0, 0, 0>
- #declare cam_loc = vrotate(cam_loc, <30, 60, 30> )
- #declare cam_loc = cam_loc + <5, 3, 4>
-
- There are also three other special variables that can be used to easily
- modify the lens flare. These are:
-
- - flare_size Specifies the scale factor of the lens flare.
- (flare_scale_factor) A value of 2 doubles the flare size, while a
- value of .5 halves it, as you would expect.
- - flare_amount This is a number from 0 to 1, 0 being no flare
- and 1 being the regular amount. Use about
- 0.5 for bright scenes.
- - flare_brightness This is a number from 0 to inf. Zero makes the
- flare black. 1 is normal (good for black
- scenes). 1.5 is good for bright scenes.
- - show_flare_source This boolean varable (yes or no value) can be
- used to make the flare source transparant. By
- default, NKFlare will create a bright spot at
- the center of the flare. Use
- #declare show_flare_source = no
- to make it more transparant.
- - flare_type Determines a predefined flare type. See below
- for available types or use flare_type = "" to
- create your own.
- This is for backwards-compatibility only. Setting
- this variable will include the appropriate FLR
- file. You should use the new syntax (which is to
- include the file yourself before including NKFlare)
-
- The lens flare can be modified in MANY other ways. See "Appendix A -
- Advanced Flare Attributes" for a reference on available parameters.
-
- *************************************************************************
- *** NEW FEATURES ***
- *************************************************************************
-
- >>>> Version 4.0 <<<<
- -------------------------------------------------------------------------
- 1) IMPORTANT INFO FOR PEOPLE UPGRADING
- -------------------------------------------------------------------------
-
- A) LnsFlare has been renamed NKFlare (Nathan Kopp's Flare plug-in).
-
- B) flare_scale_factor has been changed to flare_size (although the old
- variable name will still work)
-
- C) The syntax has been changed for preset flares! Preset flare
- information is now stored in FLR files, one for each flare type. To
- use a preset flare, include it before including NKFlare.
-
- Example:
- Old way:
- #declare flare_type="35mm"
- #include "NKFlare.inc"
-
- New way:
- #include "35mm.flr"
- #include "NKFlare.inc"
-
- (At least for this version, the old way will be supported to keep
- the old scenes working. Declaring flare_type will simply include
- the appropriate file.)
-
- The reason for this change is that you can now easily change one or
- two attributes of a preset flare type:
- #include "35mm.flr"
- #declare source_size = source_size * 2
- #include "NKFlare.inc"
-
- -------------------------------------------------------------------------
- 2) NEW SPARKLE EFFECTS ADDED
- -------------------------------------------------------------------------
- The following variables were added:
- crisp_star boolean - sparkle will have crisp edges if true
- default = false
- star_mirror boolean - sparkle will be symmetric if true
- default = true
- star_spread boolean - sparkle arms spread out if ture
- default = false (old version was true)
- star_color_rand percent - randomness of sparkle color
- default = 0
- star_size_rand percent - randomness of sparkle arm length
- default = .3
- -------------------------------------------------------------------------
- 3) NEW FLARE SPOT VARIABLES ADDED
- -------------------------------------------------------------------------
- The following variables were added:
- spots_auto_rotate boolean - spots will rotate to face center if
- true; default = false
- percent_pent percent - like percent_hex, except with
- pentagons (more realistic); default = 0
-
- -------------------------------------------------------------------------
- 4) BRIGHT_BACKGROUND and TV-DAY2 ADDED
- -------------------------------------------------------------------------
- These are somewhat related. First, I noticed that the flares did not
- look good in bright scenes. This is because they were darker than the
- background. To fix this, I added a new variable.
- If flare_brightness and flare_amount are not declared, you can
- #declare bright_background = true
-
- This will set the two variables to values that make the flares look
- good in most bright scenes. The flare becomes brighter and more
- transparant, depending on the background for much of it light and color.
-
- Also, I added a preset flare type "tv-day2" which really does look like
- the lens flare that you see on tv in daylight shows. (Kinda like 105mm
- but with more flare spots and some pentagon shaped spots.)
-
-
- >>>> Version 3.0 final <<<<
- -------------------------------------------------------------------------
- 1) FLARE_BRIGHTNESS ADDED
- -------------------------------------------------------------------------
- "flare_brightness", a new option (global to the entire flare), has been
- added. This option changes the ambient settings of the flare's finish.
- Use flare_brightness if the flare is darker than the rest of the image.
- Two other new options added are "flare_scallop_wave" and "crisp_star",
- which are explained below in appendix A.
-
- -------------------------------------------------------------------------
- 2) BUG FIXES and OTHER CHANGES
- -------------------------------------------------------------------------
- Two bugs were fixed. First, small values of flare_size caused
- the flare to take on a diamond shape. Thanks to Adrian Baumann for help
- with this fix. A new setting, "AmbientLight" has been added. If you
- change the global_settings{ambient_light} in your scene, declare the
- AmbientLight variable to match. Thanks again to Adrian Baumann. :)
-
- Changed sphere_size to disc_size.
-
- >>>> Version 3.0 beta <<<<
- -------------------------------------------------------------------------
- 1) NEW FLARE TYPES
- -------------------------------------------------------------------------
- Nine new flare types include "Space2", "Space3", "Camcorder", "85mm",
- "Concert", "TV-Day", "Sports", "WarpFlare", and "Sparkle4". Existing
- flare types have been fixed as well.
-
- -------------------------------------------------------------------------
- 2) EVEN FASTER RENDERING / DISTORTION REMOVED
- -------------------------------------------------------------------------
- By mapping the textures to discs (rather than spheres), I've increased
- render speed even more. This also removes distortion from certain flare
- types.
-
- -------------------------------------------------------------------------
- 3) RANDOMNESS IN SPARKLE EFFECT
- -------------------------------------------------------------------------
- Randomness factors have been added to the sparkle attributes of the lens
- flares. Most pre-defined flare types have been modified to reflect this
- new feature.
-
- -------------------------------------------------------------------------
- 4) FLARE STREAKS
- -------------------------------------------------------------------------
- Two new "streaks" have been added: "streak_a" and "streak_b". These function
- somewhat like "big_glow", but with some slight differences. See "Appendix
- A - Advanced Flare Attributes" for more information. They are used to
- produce the realistic "Sprots" flare, as well as adding streaks to "Space2",
- "Space3", and "Camcorder".
-
-
-
- *************************************************************************
- *** PRE-DEFINED FLARES ***
- *************************************************************************
-
- NKFlare now includes 21 preset lens flares. To use a preset flare,
- include the file that goes with the flare.(e.g. #include "35mm.flr").
- Available presets are as follows:
-
- - Space1 SPACE1.FLR
- The Space1 flare is very similar to the default flare. It four
- pronounced sparkle arms. It also has smaller and more random
- flare spots.
-
- - Space2 SPACE2.FLR
- This flare looks good for some space animations,
- like exploding stars. This flare has a horizontal streak and a
- orangish tint to it.
-
- - Space3 SPACE3.FLR
- This flare also looks good for some space
- animations. It has a horizontal streak and a bluish tint to it.
-
- - SmallStar SMLSTAR.FLR
- This flare looks good for adding sparkle to a small distant star.
- It is a very faint flare.
-
- - BigStar BIGSTAR.FLR
- This flare looks good for adding sparkle to a star that is closer
- to the camera. It has a yellowish "glow" to it but retains the four
- faint arms of SmallStar.
-
- - Sparkle1 SPARKLE1.FLR
- This small flare is great for adding sparkle to a glare or to a small
- light such as a Christmas tree light or a taillight on a car. It has
- a faint glow and four thin sparkle arms. This flare should be colored
- by specifying "#declare source_color = <r,g,b>". Default color = <1,1,1>.
-
- - Sparkle2 SPARKLE2.FLR
- This small flare is similar to Sparkle1, but has 6 arms instead of 4.
- This flare is also bigger and has more of a glow to the light source.
- This flare should also be colored by specifying "#declare source_color
- = <r,g,b>". Do not oversaturate this color... values like <.5,.5,1> for
- blue is better than <0,0,1>. Default color = <1,1,1>.
-
- - Sparkle3 SPARKLE3.FLR
- This small flare is similar to Sparkle2, but has 8 arms instead of 6 and
- also has 16 smaller sparkle arms. As with the other two sparkles, this
- flare should be colored by specifying "#declare source_color = <r,g,b>".
- Do not oversaturate this color... values like <.5,.5,1> for blue is
- better than <0,0,1>. Default color = <1,1,1>.
-
- - Sparkle4 SPARKLE4.FLR
- This small flare produces a more random sparkle effect than the other
- three sparkle flares. As with the other sparkles, this flare should
- be colored by specifying "#declare source_color = <r,g,b>".
-
- - WarpFlare WARP.FLR
- Looks like a Starship going into Warp.
-
- - 35mm 35MM.FLR
- This flare mimics actual 35mm flare. It's quite complicated.
- Test it to see what it looks like.
-
- - 50mm 50MM.FLR
- This flare mimics actual 50mm flare. It's quite complicated.
- Test it to see what it looks like.
-
- - 85mm 85MM.FLR
- This flare mimics actual 85mm flare. It's quite complicated.
- Test it to see what it looks like.
-
- - 105mm 105MM.FLR
- This flare mimics actual 105mm flare. This bluish flare is
- quite soft and lacks a primary flare ring. Test it to see what it looks
- like.
-
- - Camcorder CAMCORDR.FLR
- This flare mimics the flare created by a camcorder lens.
-
- - TV-Day TV-DAY.FLR
- Sunflare. NOT GOOD FOR DAYLIGHT SCENES... sorry about the misleading
- name. :(
-
- - TV-Day2 TV-DAY2.FLR
- Ok... this one looks good in the daylight. Of course, you will
- still need to set bright_background to true.
-
- - Concert CONCERT.FLR
- Looks like the flare from a spotlight at a rock concert.
-
- - Sports SPORTS.FLR
- This is the lens flare you see at all of the sports events on TV. Use
- it for bright lights and camera-flashes. Also good for adding sparkle
- to gems. Shaped like an "X".
-
- - Sunset1 SUNSET1.FLR
- This doesn't look good, IMHO. It is included just because. ;)
- For sunsets, use 35/50/85/105mm and declare bright_background = true.
- This flare can be used to create a sunset where you wish the flare to
- cover up the light source. This mimics a previous set of #declares that
- was included in version 1.0.
-
- - Sunset2 SUNSET2.FLR
- This doesn't look good, IMHO. It is included just because. ;)
- For sunsets, use 35/50/85/105mm and declare bright_background = true.
- This flare can be used to model a sunset where the light source is
- already created and should not be covered up. This mimics a previous
- set of #declares that was included in version 1.0.
-
- *************************************************************************
- *** HIDING YOUR FLARE ***
- *************************************************************************
- By default, the lens flare hides when it goes behind the camera. New in
- version 2.0, you can now also hide the flare behind a planet or below the
- horizon automatically. The hiding is slightly limited currently, but it
- is a great help in most animations.
-
- To allow the flare to go behind a planet, you must specify the location
- of the planet (sphere) and it's radius.
- #declare planet_loc = <x,y,z> // x,y,z coordinates of the planet
- #declare planet_rad = r // the planet's radius
-
- To allow the flare to go below the horizon (plane), you must specify the
- location and normal vector of the plane.
- #declare plane_loc = <x,y,z> // x,y,z coordinates of the plane
- #declare plane_norm = <x,y,z> // normal vector of the plane
-
- For either of the above, you must also define the size of
- your light-source:
- #declare light_rad = r // the radius of the light-source
-
- If neither of these methods is successful, you can manually hide the
- flare by setting the "flare_amount" variable.
-
- *************************************************************************
- *** HINTS, TIPS, AND TROUBLESHOOTING ***
- *************************************************************************
-
- -------------------------------------------------------------------------
- Q: Sometimes I see black spots in the flares.
-
- A: Increase the #max_trace_level. The higher you set it, the better.
- This can really slow down scenes that have a lot of glass, though.
- Too bad.
-
- -------------------------------------------------------------------------
- Q: My scene is very bright and the flare looks ugly.
-
- A: You can:
- 1) Add this line before including NKFlare
- #declare bright_background = true
- or
- 2) Adjust the flare yourself
- Turn up the flare_brightness (around 1.5 is probably good)
- Turn down the flare_amount (around 0.5 is probably good)
-
- -------------------------------------------------------------------------
- Q: I am using fog and it causes the lens flares to look strange. This
- problem is most obvious when colored fog is used.
-
- A: Unfortunately, there is not really an easy way around this. The
- best solution is to manually adjust all of the variables which
- affect the color of the flare's components.
-
- You may be able to correct the problem by using a color for
- flare_brightness. (See hint below about tinting the flare.)
-
- -------------------------------------------------------------------------
- Q: I am using focal blur in my image, and the lens flare disappears.
-
- A: Change the "disc_size" variable. This variable affects the size
- of the discs that are used to create the lens flare. It also
- changes their location. The value of "disc_size" represents the
- distance from the camera to the discs. In order for thoes discs
- to be in focus when focal blur is used, they must be at the
- focal point. If, for example, the focal point was at "f_point",
- you would use the following declaration before including NKFlare.
-
- #declare disc_size = vlength(f_point - cam_loc)
-
- -------------------------------------------------------------------------
- Q: When I rotate my camera or the light source, the flare doesn't follow.
-
- A: You need to give NKFlare the exact location of the light and camera.
-
- You may need to use POV-Ray's vector functions such as VROTATE to find
- the position of the point. This is also true for the location of
- things like the planet (if used).
-
- Example:
- camera {
- location < 0, 0, 0>
- direction < 0, 0, 1>
- up < 0, 1, 0>
- right < 1, 0, 0>
- rotate <30, 60, 30>
- translate < 5, 3, 4>
- }
- #declare cam_loc = <0, 0, 0>
- #declare cam_loc = vrotate(cam_loc, <30, 60, 30> )
- #declare cam_loc = cam_loc + <5, 3, 4>
-
- -------------------------------------------------------------------------
- Q: Can I use multiple lens flares?
-
- A: Yes.
-
- -------------------------------------------------------------------------
- Q: What if I want to hide the flare behind a space-ship instead of
- a planet.
-
- A: This can usually be done by creating an imaginary "planet" of an
- appropriate size. Then tell the lens flare to hide behind a planet
- of that size centered on the ship.
-
- -------------------------------------------------------------------------
- Q: The flare is really dark.
-
- A: If your scene adjusts the ambient_light under global_settings, you
- should set the AmbientLight variable to match.
-
- -------------------------------------------------------------------------
- Hint:
-
- You can give any flare a "tint" by changing the flare_brightness
- variable. Use a color vector instead of a normal float number.
-
- For example, if you want your flare to look purplish, use the following:
- #declare flare_brightness = <1.25, 0.5, 1.25>
-
- -------------------------------------------------------------------------
- Hint:
-
- Don't forget to keep something visible at the spot of the light_source.
- This will still be needed for certain reflections (ex: sunset on water).
-
- -------------------------------------------------------------------------
- Hint:
-
- When creating flare for a lens that may or may not be centered on the
- camera's look_at point (such as the windshield of a car), simply point
- the "lookat" vector towards the center of the lens. This will correctly
- orient both the sparkle arms and the multiple flare spots.
-
- *************************************************************************
- *** LEGAL STUFF ***
- *************************************************************************
-
- Disclaimer: I am not responsible for anything negative happening to you
- as a result of using NKFlare. If your dog dies of shock because the
- flare is so ugly, too bad. If space aliens kidnap you because your
- picture of them looks too realistic, that's your problem. Tough luck.
-
- NKFlare is provided free of charge. You may freely distribute it
- provided that this file is included. You may make changes if you like
- to. However, if you wish to distribute a modified version you must:
- 1) Do not try to conceal the fact that it originally was written
- by Nathan Kopp.
- 2) Do not try to conceal the fact that it is a modified version.
- 3) Include this TXT file (with nothing removed - you can add your
- notes in an appropriate location)
- * Do include contact information so that users can ask you about
- the changes that you have made.
- 4) Do not charge any money for it.
-
- If you would like to distribute NKFlare on a CD-ROM or another form
- of media other than the internet, please get permission first. My desire
- is for this plug-in to be freely and readily available to everyone, so I
- will be reasonable with your requests.
-
- If you find this useful, drop a note to me (or you could snail-mail a
- postcard). :)
-
- I (Nathan Kopp, the author) can be contacted at:
- nkopp@grfn.org
- nk80300@ltu.edu
- nkopp@sunny.ncmc.cc.mi.us
-
- If none of these work, you can probably contact me via Usenet on:
- comp.graphics.rendering.raytracing
-
- Also check out my web pages:
- http://www.grfn.org/~nkopp/
- http://www.grfn.org/~nkopp/flare1.html
- http://www.grfn.org/~nkopp/pov/
-
- This lens flare generator was _inspired_ by Chris Colefax's "Dome City"
- image. The code was originally created by Nathan Kopp on November 3rd,
- 1996. Thanks also to God for giving me the time and ability to finish
- this project.
-
- *************************************************************************
- *** APPENDIX A: ADVANCED FLARE ATTRIBUTES ***
- *************************************************************************
-
- There are many attributes of NKFlare that can be modified with simple
- #declare statements. To change these attributes, #declare their new
- values prior to the #include "lensflare.inc" statement.
-
- -------------------------------------------------------------------------
- PRIMARY FLARE: (centered on the light source)
- -------------------------------------------------------------------------
- The primary flare consists of a bright center which acts as the visible
- light source, since actual point lights are invisible to POV. Further
- out from the center of the flare is a semi-transparant "glow". Even
- further out is a ring-flare. See Appendix A for a breakdown of the
- primary flare's parts.
-
- source_size The apparant size of the source. default = 0.02
- glow_size The apparant size of the "glow". default = .15
- ring_size The apparant size of the "ring". default = .3
- ring_width The width of the "ring". default = .1
-
- note: Sizes are kind of like a percentage of the overall picture.
- Actual sizes will vary depending on the "distance" setting
- in the camera statement. A more telephoto lens will create
- larger flares. This is true for all xxx_size attributes.
-
- source_color The color of the light source. default = rgb <1, 1, 1>
- glow_color The color of the "glow". default = rgb <1, 1, .7>
- ring_color The color of the "ring. default = rgb <1, .7, .7>
- source_bright The max brightness of the light source. default = 2
- Source fades from this brightness to glow_bright.
- glow_bright The max brightness of the "glow". default = 1.2
- Glow fades from this brightness to 1.0.
- note: Brightnesses are multiplied by color to get the final
- color value.
-
- source_tr The minimum translucency of the source. default = .1
- glow_tr The minimum translucency of the glow. default = .7
- ring_tr The minimum translucency of the ring. default = .8
- source_fade How fast the source fades off... this is a percentage
- of the distance from source_size to glow_size and is
- where color is glow_color*glow_brightness. and transmit
- is 1/2 way between source_tr and glow_tr. Color is
- glow_color*1 at glow_size.
- flare_scallop_wave
- This causes the primary flare (source-glow-ring) to use
- a scallop_wave waveform (as opposed to the default
- ramp_wave.) This can create smoother transitions.
-
- The "big glow" is a new flare attribute to version 2.0. It is basically
- a large flare glow that is unaffected by the other parts of the primary
- flare. It can be larger than the ring size. By default, it is disabled.
- This was added to create the 35mm and 50mm lens flares.
-
- big_glow_size Radius of the "big glow". default = 0
- big_glow_color The color of the "big glow". default = <1,1,1>
- big_glow_tr The minimum translucency of the "big glow". default = 1
-
- -------------------------------------------------------------------------
- FLARE STREAKS
- -------------------------------------------------------------------------
- Flare streaks are used to produce streaks of light, usually either
- horizontal or vertical, from the light source. These streaks get thinner
- as they get farther away, unlike streaks from the sparkle (see below).
- The streaks are produced by mapping a wood texture to a disc and
- squishing it.
-
- streak_a_size The radius of the streak. default = 0
- streak_a_color The outer color of the streak.
- streak_a_center_color The center color of the streak.
- streak_a_tr The minimum transmittance of the streak.
- streak_a_scale The streak's scale factor (x=width, y=height).
- streak_a_rotate The rotation of the streak.
- streak_a_auto_rotate Yes/No - does the flare follow the lens center?
-
- Similar variables exist for the second streak, "streak_b".
-
- -------------------------------------------------------------------------
- SPARKLE AROUND THE LIGHT SOURCE: (centered on the light source)
- -------------------------------------------------------------------------
- The sparkle consists of two sets of radial arms. The first set should
- be quite large, and start to fade at a distance of star_size. The second
- set is usually more in number but begins to fade at star_size/2. To
- remove the sparkle, set num_arms and num_arms2 to zero.
-
- star_size The distance where the star starts to fade. default = .2
- star2_size The size of the second star. default = .1
- num_arms The number of arms of the sparkle. default = 9
- num_arms2 The number of little arms of the sparkle. default = 9*2
- star_width The width of each arm.. this is a percent of the total space
- for each arm. default = .2
- star2_width The width of the arms for the second star
- star_color The color of the sparkle. default = rgb<1,1,1>
- star_tr The minimum translucency of the sparkle. default = .9
-
- star_rand Randomness factor for the first sparkle. default = 0
- star_rand2 Randomenss factor for the second sparkle. default = 0
- star_seed Seed value for the star.
-
- crisp_star This causes the first star (not the second) to have sharp
- edges. For an example, look at the "concert" flare type.
- star_mirror boolean - sparkle will be symmetric if true
- default = true
- star_spread boolean - sparkle arms spread out if ture
- default = false (old version was true)
- star_color_rand percent - randomness of sparkle color
- default = 0
- star_size_rand percent - randomness of sparkle arm length
- default = .3
-
- -------------------------------------------------------------------------
- MULTIPLE LENS FLARE SPOTS (and dots):
- -------------------------------------------------------------------------
- Multiple lens flares are in a line that passes through the center of
- the picture (lookat point) and the primary flare (light_loc point).
- The flare spots get increasingly farther apart as they get farther from
- the primary flare. The randomness of various attributes of the spots
- can be set. The randomness is a percentage of the actual value.
- ex: a spot_size_rand of .2 means that each spot will be between 80%
- and 120% of it's normal size.
- To turn off the spots set num_spots = 0.
-
- spot_size The size of a spot. default = .1
- spot_color The color of a spot. default = <1,1,.7> (faded yellow)
- spot_tr Minimum translucency of a spot. default = .9
- num_spots The number of spots on each side of the flare.
- default = 4
- spot_dist Used to compute distances between spots. Bigger
- numbers mean farther spaced spots. default = .2
- spot_dist_pwr Exponential growth value of the distance between the spots.
- default = 2 (quadratic) for linear spots, use 1
- skip_spots The number of spots to skip (nearest to light source)
- spot_fade_amount Allows the spots to fade as they get farther from the
- light. default = 0. Use small values (like .05)
- spots_auto_rotate boolean - spots will rotate to face center if
- true; default = false
-
- In addition to flare spots, LnsFlare 2.0 can create flare "dots". While
- spots are more transparent on the inside (ring-like look), "dots" are
- more transparent on the outside and less on the inside. Flare dots are
- generally smaller than the ring-like spots. Increase "percent_dots" to
- replace some of the flare spots with dots. New in version 2.1 - lens flare
- spots shaped like hexagons! Use percent_hex just like you'd use percent_dots.
- Hexagon spots use spot_color, spot_tr, ans spot_size.
-
- percent_dots The percent of the spots that are randomly replaced with
- dots.
- dot_size The size of a dot. default = .04
- dot_color The color of a dot. default = <.4,1,.5> (faded green)
- dot_tr Minimum translucency of a dot. default = .75
- percent_hex The percent of the spots that are randomly replaced with
- hexagons.
- percent_pent The percent of the spots that are randomly replaced with
- pentagons.
-
-
- note: the actual distance between spots depends on the 2D distance
- between the light_source to the look_at points. The closer
- these points, the closer the spots (as you'd expect).
-
- spot_size_rand The randomness of the spots' sizes. default = 2
- spot_color_rand The randomness of the spots' color. default = 0
- spot_dist_rand Randomness of the spots' relative distance. default = 0
- spot_seed The seed for the above randoms. default = seed(546)
-
- -------------------------------------------------------------------------
- GLOBAL FLARE SETTINGS
- -------------------------------------------------------------------------
- flare_size specify the overall size of the lens flare
- (flare_scale_factor) default = 1.0
-
- flare_rotate Rotates the flare an additional amount. This value
- is added to the calculated rotational value.
- default = 0
- flare_auto_rotate Determines if the flare should rotate to face the
- center of the image. Set to flase to keep the
- flare sparkle aiming towards the top of the image.
-
- main_flare_scale Scale factor for the primary flare (including
- sparkle). x=width, y=height. Default = <1,1,1>
- big_glow_scale Scale factor for big_glow. See above
-
- flare_amount This is a number from 0 to 1, 0 being no flare
- and 1 being the regular amount.
-
- flare_brightness This is a number preferrably greater than 1. This
- adjusts the flares "ambient" finish and should be
- used if the flare is too dark for the image.
-
- bright_background If this is true, NKFlare will declare flare_brightness
- and flare_amount to values that will look decent
- against a bright background (if they are undeclared)
-
- -------------------------------------------------------------------------
- MISC
- -------------------------------------------------------------------------
-
- ** Hiding the flare **
- Use the following to define the planet which your light will go behind:
- #declare planet_loc = <x,y,z> // x,y,z coordinates of the planet
- #declare planet_rad = r // the planet's radius
-
- Use the following to define the plane which your light will go behind:
- #declare plane_loc = <x,y,z> // x,y,z coordinates of the plane
- #declare plane_norm = <x,y,z> // normal vector of the plane
-
- For either of the above, you must also define the size of
- your light-source:
- #declare light_rad = r // the radius of the light-source
-
- ** Ambient light settings **
- If you use the ambient_light=<color> statement, you should also add the
- following line to avoid getting strange results:
- #declare AmbientLight= <color> //defaults to <1,1,1>
-
- ** Disc size **
- Finally, the texture is mapped to small discs which are translated to
- the camera location. You can set the disc-camera distance with:
- disc_size default = .1
-
- I do not suggest specifying a disc_size more than once. NKFlare will
- automatically make sure that no disc_size is repeated if you only
- specify the first size (or none at all).
-
-
- *************************************************************************
- *** APPENDIX B - PRIMARY FLARE PARTS BREAKDOWN ***
- *************************************************************************
-
- Position Color Transmit
- -----------------------------------------------------------------------
- 0 source_color*source_bright source_tr
-
- source_size source_color*glow_bright source_tr
-
- % from source_size glow_color*glow_bright 1/2 from source_tr
- to glow_size to glow_tr
-
- glow_size glow_color glow_tr
-
- 1/2 from glow_size glow_color and 100%
- to ring_size ring_color
-
- ring_size ring_color ring_tr
-
- 1% past ring_size ring_color 100%
-
-
-
-